#ifndef GAINCTRL_H
#define GAINCTRL_H

#define GAINDAMPCOEF (0.0002f) // 榛樿鍊硷紝鍗曚綅涓衡�滅鈥�

typedef struct {
	float hg;
	float damp;
	float mflag;//mute flag
} gainCtrlH;



void gainCtrlInit(gainCtrlH* h);

void gainCtrlSet(gainCtrlH *h, float damp);//set the damping rate

void gainCtrlMute(gainCtrlH* h, float mflag);


void gainCtrlApply(gainCtrlH* h, int *x, int*y,//x y can be the same
	float g, //linear gain value
	int len);











#endif // !GAINCTRL_H
